<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>MOON</title>
<link rel="stylesheet" th:href="@{/moon/css/bootstrap.css}" />
<link rel="stylesheet" th:href="@{/icon/css/font-awesome.min.css}" />
</head>
<body class="bg-b">
	<div class="container-fluid" id="app">
		<div class="row">
			<div class="col text-center bg-danger text-white shadow">全文检索elasticsearch</div>
		</div>
		<div class="row mt-2">
			<div class="form-inline">
				<input type="text" class="form-control form-control-sm" id="word" placeholder="请输入关键词"/>
				<button @click="search()" class="btn btn-sm btn-outline-success ml-1">查询</button>
			</div>
		</div>
	</div>
	<!-- js -->
	<script th:src="@{/moon/js/jquery.js}"></script>
	<script th:src="@{/moon/js/vue.js}"></script>
	<script th:src="@{/layer/layer.js}"></script>
	<script th:inline="javascript">
		//
		var app=new Vue({
			el : "#app",
			data:{
				poetry:[]
			},
			methods:{
				search:function(){
					$.post(
						"/moon/Poetry/findByword",
						{
							word : $("#word").val()
							},
						function(data){
							alert(JSON.stringify(data));
						}
					);
				}
			}
		});
	</script>
</body>
</html>